docs(dart): Cover stream mode across tracing pages#18611
Open
buenaflor wants to merge 16 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Dart and Flutter tracing documentation to clarify how stream mode (span streaming) affects manual/automatic instrumentation and distributed trace continuation, aligning the tracing pages with the newer span APIs.
Changes:
- Adds stream mode callouts to manual instrumentation pages, directing readers to
Sentry.startSpanAPIs (since transaction APIs are no-ops in stream mode). - Adds stream mode callouts to automatic instrumentation pages noting that auto-instrumentation switches to streaming span APIs automatically.
- Adds stream mode callouts to trace propagation pages noting that continuing an incoming distributed trace isn’t supported yet in stream mode.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/platforms/dart/guides/flutter/tracing/trace-propagation/index.mdx | Adds a stream mode limitation callout for continuing incoming distributed traces. |
| docs/platforms/dart/guides/flutter/tracing/instrumentation/custom-instrumentation.mdx | Adds a stream mode callout pointing manual instrumentation to Sentry.startSpan and New Spans. |
| docs/platforms/dart/guides/flutter/tracing/instrumentation/automatic-instrumentation.mdx | Adds a stream mode callout stating auto-instrumentation switches APIs automatically and links to New Spans. |
| docs/platforms/dart/common/tracing/trace-propagation/index.mdx | Adds a stream mode limitation callout for continuing incoming distributed traces. |
| docs/platforms/dart/common/tracing/trace-propagation/custom-instrumentation/index.mdx | Adds a stream mode limitation callout and links to New Spans. |
| docs/platforms/dart/common/tracing/instrumentation/custom-instrumentation.mdx | Adds a stream mode callout pointing manual instrumentation to Sentry.startSpan and New Spans. |
| docs/platforms/dart/common/tracing/instrumentation/automatic-instrumentation.mdx | Adds a stream mode callout stating auto-instrumentation switches APIs automatically and links to New Spans. |
45fa64b to
dff9eb6
Compare
fedd806 to
fbc2c56
Compare
6 tasks
fbc2c56 to
2fc3a53
Compare
47f4b17 to
e3ee6bc
Compare
Document stream mode (SentryTraceLifecycle.stream) for the Dart and Flutter SDKs, where spans are sent as they finish instead of being batched into a transaction. Mirrors the Python New Spans pages. - New Spans page: enabling stream mode, manual instrumentation with startSpan/startSpanSync/startInactiveSpan, typed attributes, status, beforeSendSpan/ignoreSpans, sampling, and verification - Migration guide: mapping transaction-based APIs to the new span APIs - Platform-includes split init snippets for Flutter vs plain Dart Co-Authored-By: Claude <noreply@anthropic.com>
Fix two factual errors in the New Spans pages verified against the SDK source: a custom tracesSampler receives a different sampling context in stream mode (read name and attributes from spanContext, not the transaction context), and beforeSendSpan runs when each span ends and sees all attributes rather than only creation-time ones. Also add the service span type to the span taxonomy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Add the array SentryAttribute factories (stringArray/intArray/boolArray/ doubleArray) to the attributes table and clarify that startSpanSync is the synchronous variant of startSpan (T vs Future<T> callback). Co-Authored-By: Claude <noreply@anthropic.com>
The enum has four values (ok, error, cancelled, deadlineExceeded), not just ok/error. Fix the New Spans and migration guide wording. Co-Authored-By: Claude <noreply@anthropic.com>
Per SDK maintainer: only ok and error are valid stream-mode span statuses. Co-Authored-By: Claude <noreply@anthropic.com>
Mirror the Python migration guide: scope setTag isn't applied to streamed spans; use Sentry.setAttributes to set span-applying attributes. Co-Authored-By: Claude <noreply@anthropic.com>
Point custom instrumentation to the new Sentry.startSpan APIs for stream mode, note that automatic instrumentation switches to the streaming span API automatically, and flag that continuing an incoming distributed trace isn't supported yet in stream mode. Covers both Dart and Flutter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Convert the custom-instrumentation code snippets to dual Transaction Mode (Default) / Stream Mode tabs, mirroring the Python docs approach. Reword prose to cover both modes. Co-Authored-By: Claude <noreply@anthropic.com>
Use Sentry.startSpan (async) in all stream mode snippets instead of mixing in startSpanSync; startSpanSync is documented once in New Spans as the synchronous-signature variant. Co-Authored-By: Claude <noreply@anthropic.com>
Genericize automatic-instrumentation and performance-metrics prose to cover both modes, and add a Stream Mode tab to custom performance metrics (setMeasurement -> span attributes). Co-Authored-By: Claude <noreply@anthropic.com>
Add a New Spans pointer and mode-aware wording to the tracing setup and Verify sections, note that distributed-trace continuation and transaction naming differ in stream mode, and genericize the features overview. Co-Authored-By: Claude <noreply@anthropic.com>
Use SentryAttribute.stringArray/intArray/boolArray for the array cases, matching the transaction-mode setData arrays. Co-Authored-By: Claude <noreply@anthropic.com>
516abc0 to
2ac20c0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DESCRIBE YOUR PR
Documents stream mode across the Dart/Flutter tracing pages. Following the Python precedent, code snippets gain a
Stream Modetab next toTransaction Mode (Default)(nothing is removed), and prose is genericized to cover both modes.startSpan-onlysetMeasurement→ span attributesStacked on #18554 — review/merge that first.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: